import 'package:gzmall_app/model/order_item.dart';
import 'package:json_annotation/json_annotation.dart';

part 'shopping_cart.g.dart';

@JsonSerializable()
class ShoppingCart extends Object {
  @JsonKey(name: 'shop_name')
  String shopName;

  @JsonKey(name: 'order_items')
  List<OrderItem> orderItems;

  bool isSelected = false;

  ShoppingCart(
    this.shopName,
    this.orderItems,
  );

  factory ShoppingCart.fromJson(Map<String, dynamic> srcJson) =>
      _$ShoppingCartFromJson(srcJson);
}
